package com.cxs.migrationdemo;

import com.cxs.migrationdemo.slice.MainAbilitySlice;
import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;

public class MainAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(MainAbilitySlice.class.getName());

        // 动态申请需要的权限
        requestPermissionsFromUser(new String[]{
                "ohos.permission.DISTRIBUTED_DATASYNC",
                "ohos.permission.servicebus.ACCESS_SERVICE",
                "com.example.phonedemo02.servicebus.BIND_SERVICE"
        }, 0);
    }
}
